package com.monitor.controller.back;

import com.monitor.common.MonitorConstants;
import com.monitor.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

/**
 * @ClassName IndexController
 * @Package com.monitor.controller.back
 * @Description 页面跳转
 * @Author zhixingbai
 * @Create 2018/10/1116:40
 */
@Controller
public class IndexController extends BaseController {

    @RequestMapping("/monitor")
    public String monitor(){
        return "index";
    }
    @RequestMapping("/bak")
    public String warning(){
        return "bak";
    }
    @RequestMapping("/login")
    public String login(){
        return "login";
    }
    @RequestMapping("/")
    public String index(){
        return "login";
    }
    @RequestMapping("/channel")
    public String channel(){
        return "channel";
    }
    @RequestMapping("/setting")
    public String setting(){
        return "setting";
    }
    @RequestMapping("/task")
    public String task(){
        return "task";
    }


    @RequestMapping("/logout")
    public String logout(){
        logger.info("登出");
        removeSessionAttr(MonitorConstants.USER_SESSION_KEY);
        return InternalResourceViewResolver.REDIRECT_URL_PREFIX + "/";
    }




}
